package com.ykt.validator;

import com.jfinal.core.Controller;

/**
 * @author long.hua
 * @version 1.0.0
 * @since 2016-03-01 22:24
 */
public class RyValidator extends BaseValidator{

    @Override
    protected void validate(Controller c) {
        validateRequired("name", "nameMsg", "必须传用户名称！");
        validateRequired("head", "headMsg", "必须传用户头像！");
    }

    @Override
    protected void handleError(Controller c) {
        c.renderJson(super.toJsonText(c));
    }
}
